<template>
  <div class="mgl-editor-view" :class="{ bordered: 'bordered' }" :style="styles">
    <froala-view v-model="content"></froala-view>
  </div>
</template>

<script>
import VueFroala from "../vue-froala";

export default {
  name: "mgl-editor-view",
  components: {
    VueFroala
  },
  props: {
    bordered: {
      type: Boolean,
      default: true
    },
    content: {
      type: String,
      default: ""
    },
    styles: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  data() {
    return {
      //content: this.value
    };
  },
  watch: {}
};
</script>

<style lang="less">

  @font-face {
    font-family: 'menksoft2012';
    src: url('../../assets/fonts/menksoft2012.eot');
    src: local("?"),
    url('../../assets/fonts/menksoft2012.eot?#iefix') format('embedded-opentype'),
    url('../../assets/fonts/menksoft2012.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
  }

  .mgl() {
    font-family: 'menksoft2012', "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", '微软雅黑', 'Courier', 'monospace';
    -moz-writing-mode: vertical-lr;
    writing-mode: vertical-lr;
    -webkit-writing-mode: vertical-lr;
    -o-writing-mode: vertical-lr;
    -ms-writing-mode: tb-lr;
    -webkit-text-orientation: sideways-right;
  }
.mgl-editor-view {

  padding:  20px 10px;
  max-height: 600px;
  overflow: hidden;

  &.bordered {
    border: 1px solid #cfcfcf;
  }
  .fr-view {
    .mgl;
    min-height: 200px;
    overflow-x: auto;
    font-size: 24px;
    word-spacing: 2px;
    line-height: 1.2;
    width: 100%;

    p {
      text-indent: 30px;
      margin: 0; 
      margin-right: 20px;
    }
  }
}
</style>
 
